package com.dsl.tms.mapper.tmsdb;

import com.dsl.tms.entity.tmsdb.DB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Mapper
public interface DBMapper {


    public DB getDBById(int id);

    @Select("SELECT * FROM db WHERE dbname=#{dbname}")
    @ResultType(DB.class)
    public DB getDBByDbName(@Param("dbname") String dbname);

    @Select("SELECT * FROM db WHERE ofgroup=#{ofgroup}")
    @ResultType(DB.class)
    public ArrayList<DB> getDBList(@Param("ofgroup") String ofgroup);
}
